package com.create.myworld.util;

import com.create.myworld.config.TopicRabbitConfig;
import org.springframework.amqp.rabbit.core.RabbitTemplate;


/**
 * @author zcw
 * rabbitmq工具类
 */
public class RabbitMQUtil {

    public static RabbitTemplate rabbitTemplate;

    public static void pushNormal(String content) {
        rabbitTemplate.convertAndSend(TopicRabbitConfig.exchangeName, TopicRabbitConfig.normalKey, content);
    }

    public static void pushDie(String content) {
        rabbitTemplate.convertAndSend(TopicRabbitConfig.exchangeName, TopicRabbitConfig.dieKey, content);
    }

}
